<template lang="html">
  <div class="bids-detail">
    <div class="btn-group">
      <form>
        <el-select v-model="selectValue" filterable placeholder="请选择" class="select">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
          <el-button type="primary" icon="search">搜索</el-button>
        </el-select>
        <el-button type="primary" icon="search" @click="search">搜索</el-button>
        <el-button type="primary" icon="edit" @click="toDetail">添加</el-button>
      </form>
    </div>

    <el-table
      :data="tableData"
      border
      style="width: 100%">
      <el-table-column
        prop="date"
        label="日期"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="姓名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="address"
        label="地址">
      </el-table-column>
    </el-table>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout=" prev, pager, next, jumper"
      :total="400">
    </el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
      options: [],
      selectValue: '',
      currentPage: 0,
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  },
  methods: {
    handleSizeChange() {

    },
    handleCurrentChange() {

    },
    search() {

    },
    toDetail() {
      this.$router.push('/backend/index/bids-detail')
    }
  }
}
</script>

<style lang="scss">
.bids-detail{
  padding-left: 35px;
  padding-right: 20px;
  .btn-group{
    margin-bottom: 20px;
  }
  .el-pagination{
    text-align: center;
    padding-top: 30px;
  }
  .select{
    margin-right: 10px;
  }
}
</style>
